//
//  HJHHomeDetailViewController.swift
//  WeiBoPro
//
//  Created by nadyboy on 2018/4/26.
//  Copyright © 2018年 hjh. All rights reserved.
//

import UIKit
import SnapKit
class HJHHomeDetailViewController: HJHBaseViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view.

        self.view.addSubview(self.webView)
        self.webView.snp.makeConstraints { (make) in
            make.edges.equalTo(self.view)
        }
        self.title = "\(childViewControllers.count + 1)"
        self.navItem.rightBarButtonItem = UIBarButtonItem(title: "下一步", style: .plain, target: self, action: #selector(pushNextVc))
        
        let que = DispatchQueue(label: "")
        let mainque = DispatchQueue.main
        let global = DispatchQueue.global()
    }
    
    @objc func pushNextVc()
    {
       let vc =  HJHHomeDetailViewController()
        vc.title =  "\(childViewControllers.count + 1)"
        self.navigationController?.pushViewController(vc, animated: true)
    }
    /*
      init webview
     */
    lazy var webView: UIWebView = {
        let web = UIWebView()
        let url = NSURL(string: "https://weibo.com/?display=0&retcode=6102")
        let request = URLRequest.init(url: url! as URL, cachePolicy:.reloadIgnoringLocalCacheData, timeoutInterval: 60.0)
        web.loadRequest(request)
        return web
    }()
    
    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }

}
